package cc.autoapi.pucong.auto.flow.core.qlexpress.enumSelf;

public enum ComputerTypeEnum {
    加("add"),
    减("sub"),
    乘("mul"),
    除("div"),
    左括号("left"),
    右括号("right"),

    ;

    private String code;

    private ComputerTypeEnum(String code) {
        this.code = code;
    }

    public static ComputerTypeEnum getEnumByCode(String code) {
        for (ComputerTypeEnum e : ComputerTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }
}
